package com.yyg.usecase.springbootwebdemo.service.validator;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

@Service
public class UserService {

    //创建用户
    public void createUser(@Validated(UserCreateGroup.class) UserRequest userRequest) {
        System.out.println(JSON.toJSON(userRequest));
    }

    public void updateUser(@Validated(UserUpdateGroup.class) UserRequest userRequest) {
        System.out.println(JSON.toJSON(userRequest));
    }


}
